package cn.tedu.mybatis.mapper;

import cn.tedu.mybatis.entity.Admin;
import cn.tedu.mybatis.vo.AdminDetailsVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AdminMapper {

    int insert(Admin admin);

    int insertBatch(List<String> usernames);

    int deleteById(Long id);

    int deleteByIds(Long... ids);

    //        class     >>>     arg0       arg1    ……  arg2
    //                          param1     param2  ……  param3
    int updatePasswordById(@Param("id") Long id, @Param("password") String password);

    int count();

    Admin getById(Long id);

    AdminDetailsVO getDetailsById(Long id);

    List<Admin> list();

}
